import Cookies from "js-cookie";
import './request'
const TokenKey='token'
const UsernameKey='username'
const AvatarKey='avatar'
const UserIdKey='userId'
const EmailKey='email'
const IntrodeuceKey='introduce'
const SexKey='sex'
const PhoneNumberKey='phoneNumber'
const RegTimeKey='regTime'
const LastUpdateTimeKey='lastUpdateTime'
export function getToken() {
    return Cookies.get(TokenKey)
}
export function setToken(token){
    return Cookies.set(TokenKey,token)
}
export function removeToken(){
    return Cookies.remove(TokenKey)
}
export function setUserName(username){
    console.log('username接收到了',username)
    return sessionStorage.setItem(UsernameKey,username)
}
export function getUserName(){
    console.log('获取姓名是',sessionStorage.getItem(UsernameKey))
    return sessionStorage.getItem(UsernameKey)
}
export function removeUserName(){
    return sessionStorage.removeItem(UsernameKey)
}
export function setAvatar(avatar){
    return sessionStorage.setItem(AvatarKey,avatar)
}
export function getAvatar(){
    return sessionStorage.getItem(AvatarKey)
}
export function removeAvatar(){
    return sessionStorage.removeItem(AvatarKey)
}
export function setUserId(userId){
    return sessionStorage.setItem(UserIdKey,userId)
}
export function getUserId(){
    return sessionStorage.getItem(UserIdKey)
}
export function removeUserId(){
    return sessionStorage.removeItem(UserIdKey)
}
export function setEmail(email){
    return sessionStorage.setItem(EmailKey,email)
}
export function getEmail(){
    return sessionStorage.getItem(EmailKey)
}
export function removeEmail(){
    return sessionStorage.removeItem(EmailKey)
}
export function setIntroduce(introduce){
    return sessionStorage.setItem(IntrodeuceKey,introduce)
}
export function getIntroduce(){
    return sessionStorage.getItem(IntrodeuceKey)
}
export function removeIntroduce(){
    return sessionStorage.removeItem(IntrodeuceKey)
}
export function setSex(sex){
    return sessionStorage.setItem(SexKey,sex)
}
export function getSex(){
    return sessionStorage.getItem(SexKey)
}
export function removeSex(){
    return sessionStorage.removeItem(SexKey)
}
export function setPhoneNumber(phoneNumber){
    return sessionStorage.setItem(PhoneNumberKey,phoneNumber)
}
export function getPhoneNumber(){
    return sessionStorage.getItem(PhoneNumberKey)
}
export function removePhoneNumber(){
    return sessionStorage.removeItem(PhoneNumberKey)
}
export function setRegTime(regTime){
    return sessionStorage.setItem(RegTimeKey,regTime)
}
export function getRegTime(){
    return sessionStorage.getItem(RegTimeKey)
}
export function removeRegTime(){
    return sessionStorage.removeItem(RegTimeKey)
}
export function setLastUpdateTime(lastUpdateTime){
    return sessionStorage.setItem(LastUpdateTimeKey,lastUpdateTime)
}
export function getLastUpdateTime(){
    return sessionStorage.getItem(LastUpdateTimeKey)
}
export function removeLastUpdateTime(){
    return sessionStorage.removeItem(LastUpdateTimeKey)
}